<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <button v-on:click="f1()">按钮</button>
    <button @click="f1()">按钮</button>
</div>
<script src="../js/vue.js"></script>
<script>
    let v = new Vue({
        el:"body>div",
        /*快捷键：vdata 自动生成*/
        data() {
            return {
                info: "事件绑定"
            }
        },
        /*快捷键：vmethod自动生成*/
        methods: {
            f1() {
              alert("风")
            }
        },
    })
</script>
</body>
</html>